<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE html>
<html:html lang="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><bean:message key="welcome.title" /></title>
<link
	href="css/mini3537.css?files=reset,common,form,standard,960.gs.fluid,simple-lists,block-lists,planning,table,calendars,wizard,gallery"
	rel="stylesheet" type="text/css">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="icon" type="image/png" href="favicon-large.png">
<script type="text/javascript"
	src="js/miniab15.php?files=html5,jquery-1.4.2.min,old-browsers,jquery.accessibleList,searchField,common,standard,jquery.tip,jquery.hashchange,jquery.contextMenu,list"></script>
<html:base />


</head>
<body>

	<!-- *************************************** Content *************************************************** -->
	<section class="grid_4">
		<div class="block-border">
			<html:form styleClass="block-content form" action="cus.do">
				<div class="block-controls">
					 <input type="text" disabled="disabled" /> <a  class="button">Search</a>
				</div>

				<div class="no-margin">
					<table class="table" cellspacing="0" width="100%">

						<thead>
							<tr>
								<th class="black-cell">No</th>
								<th scope="col">Custommers Name</th>
								<th scope="col">Address</th>
								<th scope="col">Phone Number</th>
								<th scope="col">Email</th>
								<th scope="col" class="table-actions">Actions</th>

							</tr>
						</thead>

						<tbody>


							<logic:present name="CusForm" property="arrCus">
								<logic:iterate id="listCus" name="CusForm" property="arrCus"
									indexId="index">
									<tr>
										<td><%=index.intValue() + 1%></td>
										<td><bean:write name="CusForm"
												property='<%="arrCus[" + index + "].name"%>' /> <html:hidden
												name="CusForm" property='<%="arrCus[" + index + "].name"%>'
												styleId='<%="arrCus[" + index + "].name"%>' /> <html:hidden
												name="CusForm" property='<%="arrCus[" + index + "].id"%>'
												styleId='<%="arrCus[" + index + "].id"%>' /></td>
										<td><bean:write name="CusForm"
												property='<%="arrCus[" + index + "].adress"%>' /></td>
										<td><bean:write name="CusForm"
												property='<%="arrCus[" + index + "].phoneNum"%>' /></td>
										<td><bean:write name="CusForm"
												property='<%="arrCus[" + index + "].email"%>' /></td>
										<td><a title="Detial" class="with-tip"
											onclick="selectCus(<%=index.intValue()%>)"><img
												src="images/icons/fugue/tick-circle-blue.png" width="18"
												height="18"></a></td>
									</tr>
								</logic:iterate>
							</logic:present>
						</tbody>
					</table>
				</div>
				<ul class="message no-margin">
					<li>Results 1 - 5 out of 23</li>
				</ul>
		</div>

		</html:form>
		</div>
	</section>
	<!-- *************************************** Content *************************************************** -->
	</article>
</body>
</html:html>
<script type="text/javascript" language="javascript">
    function selectCus(id){
    	var controlName = document.getElementById('arrCus[' + id + '].name');
    		controrID = document.getElementById('arrCus[' + id + '].id');
    	opener.document.ContractForm.nameCustommers.value = controlName.value;
    	opener.document.ContractForm.idCustommers.value = controrID.value;
    	self.close();
    }
</script>